package com.mhc.haval.service;

import com.mhc.haval.api.dto.StaffRoleDTO;
import com.mhc.haval.bo.RoleBO;
import com.mhc.haval.dal.model.RoleDO;
import com.mhc.haval.exception.HavalCommonException;
import com.mhc.haval.vo.RoleFuncVO;
import com.mhc.haval.vo.StaffRoleVO;

import java.util.List;

/**
 * @author Churry
 * @create 2017-08-23 13:29
 **/
public interface RoleService {

    /**
     * 获取角色列表
     * @return
     */
    List<RoleDO> getRoleList() throws HavalCommonException;

    /**
     * 获取角色详情
     * @return
     */
    RoleBO getRoleDetail(Long roleId) throws HavalCommonException;

    /**
     * 新增角色详情
     * @return
     */
    Boolean addRoleDetail(RoleBO role, List<RoleFuncVO> roleFuncList) throws HavalCommonException;

    /**
     * 修改角色详情
     * @return
     */
    Boolean updateRoleDetail(RoleBO role, List<RoleFuncVO> roleFuncList) throws HavalCommonException;

    /**
     * 删除角色
     * @param roleId 角色id
     * @return
     * @throws Exception
     */
    Boolean deleteRole(Long staffId, Long roleId) throws HavalCommonException;

    /**
     * 根据角色code查找用户
     * @param roleCode
     * @return
     * @throws HavalCommonException
     */
    public List<StaffRoleVO> selectStaffByRole(String roleCode) throws HavalCommonException;

}
